<?php


abstract class BaseTransactionData extends BaseObject  implements Persistent {


	
	protected static $peer;


	
	protected $id;


	
	protected $status_id;


	
	protected $state_id;


	
	protected $user_id;


	
	protected $customer_id;


	
	protected $ip;


	
	protected $receipt_id;


	
	protected $order_id;


	
	protected $requested_amount_ct;


	
	protected $requested_currency_code;


	
	protected $paid_amount_ct;


	
	protected $paid_currency_code;


	
	protected $sign_password;


	
	protected $transaction_id;


	
	protected $project_id;


	
	protected $project;


	
	protected $paytext;


	
	protected $returned_ss2;


	
	protected $returned_error;


	
	protected $returned_status;


	
	protected $is_test;


	
	protected $data_json;


	
	protected $updated_at;


	
	protected $created_at;


	
	protected $approved_at;

	
	protected $alreadyInSave = false;

	
	protected $alreadyInValidation = false;

	
	public function getId()
	{

		return $this->id;
	}

	
	public function getStatusId()
	{

		return $this->status_id;
	}

	
	public function getStateId()
	{

		return $this->state_id;
	}

	
	public function getUserId()
	{

		return $this->user_id;
	}

	
	public function getCustomerId()
	{

		return $this->customer_id;
	}

	
	public function getIp()
	{

		return $this->ip;
	}

	
	public function getReceiptId()
	{

		return $this->receipt_id;
	}

	
	public function getOrderId()
	{

		return $this->order_id;
	}

	
	public function getRequestedAmountCt()
	{

		return $this->requested_amount_ct;
	}

	
	public function getRequestedCurrencyCode()
	{

		return $this->requested_currency_code;
	}

	
	public function getPaidAmountCt()
	{

		return $this->paid_amount_ct;
	}

	
	public function getPaidCurrencyCode()
	{

		return $this->paid_currency_code;
	}

	
	public function getSignPassword()
	{

		return $this->sign_password;
	}

	
	public function getTransactionId()
	{

		return $this->transaction_id;
	}

	
	public function getProjectId()
	{

		return $this->project_id;
	}

	
	public function getProject()
	{

		return $this->project;
	}

	
	public function getPaytext()
	{

		return $this->paytext;
	}

	
	public function getReturnedSs2()
	{

		return $this->returned_ss2;
	}

	
	public function getReturnedError()
	{

		return $this->returned_error;
	}

	
	public function getReturnedStatus()
	{

		return $this->returned_status;
	}

	
	public function getIsTest()
	{

		return $this->is_test;
	}

	
	public function getDataJson()
	{

		return $this->data_json;
	}

	
	public function getUpdatedAt($format = 'Y-m-d H:i:s')
	{

		if ($this->updated_at === null || $this->updated_at === '') {
			return null;
		} elseif (!is_int($this->updated_at)) {
						$ts = strtotime($this->updated_at);
			if ($ts === -1 || $ts === false) { 				throw new PropelException("Unable to parse value of [updated_at] as date/time value: " . var_export($this->updated_at, true));
			}
		} else {
			$ts = $this->updated_at;
		}
		if ($format === null) {
			return $ts;
		} elseif (strpos($format, '%') !== false) {
			return strftime($format, $ts);
		} else {
			return date($format, $ts);
		}
	}

	
	public function getCreatedAt($format = 'Y-m-d H:i:s')
	{

		if ($this->created_at === null || $this->created_at === '') {
			return null;
		} elseif (!is_int($this->created_at)) {
						$ts = strtotime($this->created_at);
			if ($ts === -1 || $ts === false) { 				throw new PropelException("Unable to parse value of [created_at] as date/time value: " . var_export($this->created_at, true));
			}
		} else {
			$ts = $this->created_at;
		}
		if ($format === null) {
			return $ts;
		} elseif (strpos($format, '%') !== false) {
			return strftime($format, $ts);
		} else {
			return date($format, $ts);
		}
	}

	
	public function getApprovedAt($format = 'Y-m-d H:i:s')
	{

		if ($this->approved_at === null || $this->approved_at === '') {
			return null;
		} elseif (!is_int($this->approved_at)) {
						$ts = strtotime($this->approved_at);
			if ($ts === -1 || $ts === false) { 				throw new PropelException("Unable to parse value of [approved_at] as date/time value: " . var_export($this->approved_at, true));
			}
		} else {
			$ts = $this->approved_at;
		}
		if ($format === null) {
			return $ts;
		} elseif (strpos($format, '%') !== false) {
			return strftime($format, $ts);
		} else {
			return date($format, $ts);
		}
	}

	
	public function setId($v)
	{

						if ($v !== null && !is_int($v) && is_numeric($v)) {
			$v = (int) $v;
		}

		if ($this->id !== $v) {
			$this->id = $v;
			$this->modifiedColumns[] = TransactionDataPeer::ID;
		}

	} 
	
	public function setStatusId($v)
	{

						if ($v !== null && !is_int($v) && is_numeric($v)) {
			$v = (int) $v;
		}

		if ($this->status_id !== $v) {
			$this->status_id = $v;
			$this->modifiedColumns[] = TransactionDataPeer::STATUS_ID;
		}

	} 
	
	public function setStateId($v)
	{

						if ($v !== null && !is_int($v) && is_numeric($v)) {
			$v = (int) $v;
		}

		if ($this->state_id !== $v) {
			$this->state_id = $v;
			$this->modifiedColumns[] = TransactionDataPeer::STATE_ID;
		}

	} 
	
	public function setUserId($v)
	{

						if ($v !== null && !is_int($v) && is_numeric($v)) {
			$v = (int) $v;
		}

		if ($this->user_id !== $v) {
			$this->user_id = $v;
			$this->modifiedColumns[] = TransactionDataPeer::USER_ID;
		}

	} 
	
	public function setCustomerId($v)
	{

						if ($v !== null && !is_int($v) && is_numeric($v)) {
			$v = (int) $v;
		}

		if ($this->customer_id !== $v) {
			$this->customer_id = $v;
			$this->modifiedColumns[] = TransactionDataPeer::CUSTOMER_ID;
		}

	} 
	
	public function setIp($v)
	{

						if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->ip !== $v) {
			$this->ip = $v;
			$this->modifiedColumns[] = TransactionDataPeer::IP;
		}

	} 
	
	public function setReceiptId($v)
	{

						if ($v !== null && !is_int($v) && is_numeric($v)) {
			$v = (int) $v;
		}

		if ($this->receipt_id !== $v) {
			$this->receipt_id = $v;
			$this->modifiedColumns[] = TransactionDataPeer::RECEIPT_ID;
		}

	} 
	
	public function setOrderId($v)
	{

						if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->order_id !== $v) {
			$this->order_id = $v;
			$this->modifiedColumns[] = TransactionDataPeer::ORDER_ID;
		}

	} 
	
	public function setRequestedAmountCt($v)
	{

						if ($v !== null && !is_int($v) && is_numeric($v)) {
			$v = (int) $v;
		}

		if ($this->requested_amount_ct !== $v) {
			$this->requested_amount_ct = $v;
			$this->modifiedColumns[] = TransactionDataPeer::REQUESTED_AMOUNT_CT;
		}

	} 
	
	public function setRequestedCurrencyCode($v)
	{

						if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->requested_currency_code !== $v) {
			$this->requested_currency_code = $v;
			$this->modifiedColumns[] = TransactionDataPeer::REQUESTED_CURRENCY_CODE;
		}

	} 
	
	public function setPaidAmountCt($v)
	{

						if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->paid_amount_ct !== $v) {
			$this->paid_amount_ct = $v;
			$this->modifiedColumns[] = TransactionDataPeer::PAID_AMOUNT_CT;
		}

	} 
	
	public function setPaidCurrencyCode($v)
	{

						if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->paid_currency_code !== $v) {
			$this->paid_currency_code = $v;
			$this->modifiedColumns[] = TransactionDataPeer::PAID_CURRENCY_CODE;
		}

	} 
	
	public function setSignPassword($v)
	{

						if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->sign_password !== $v) {
			$this->sign_password = $v;
			$this->modifiedColumns[] = TransactionDataPeer::SIGN_PASSWORD;
		}

	} 
	
	public function setTransactionId($v)
	{

						if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->transaction_id !== $v) {
			$this->transaction_id = $v;
			$this->modifiedColumns[] = TransactionDataPeer::TRANSACTION_ID;
		}

	} 
	
	public function setProjectId($v)
	{

						if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->project_id !== $v) {
			$this->project_id = $v;
			$this->modifiedColumns[] = TransactionDataPeer::PROJECT_ID;
		}

	} 
	
	public function setProject($v)
	{

						if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->project !== $v) {
			$this->project = $v;
			$this->modifiedColumns[] = TransactionDataPeer::PROJECT;
		}

	} 
	
	public function setPaytext($v)
	{

						if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->paytext !== $v) {
			$this->paytext = $v;
			$this->modifiedColumns[] = TransactionDataPeer::PAYTEXT;
		}

	} 
	
	public function setReturnedSs2($v)
	{

						if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->returned_ss2 !== $v) {
			$this->returned_ss2 = $v;
			$this->modifiedColumns[] = TransactionDataPeer::RETURNED_SS2;
		}

	} 
	
	public function setReturnedError($v)
	{

						if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->returned_error !== $v) {
			$this->returned_error = $v;
			$this->modifiedColumns[] = TransactionDataPeer::RETURNED_ERROR;
		}

	} 
	
	public function setReturnedStatus($v)
	{

						if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->returned_status !== $v) {
			$this->returned_status = $v;
			$this->modifiedColumns[] = TransactionDataPeer::RETURNED_STATUS;
		}

	} 
	
	public function setIsTest($v)
	{

						if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->is_test !== $v) {
			$this->is_test = $v;
			$this->modifiedColumns[] = TransactionDataPeer::IS_TEST;
		}

	} 
	
	public function setDataJson($v)
	{

						if ($v !== null && !is_string($v)) {
			$v = (string) $v; 
		}

		if ($this->data_json !== $v) {
			$this->data_json = $v;
			$this->modifiedColumns[] = TransactionDataPeer::DATA_JSON;
		}

	} 
	
	public function setUpdatedAt($v)
	{

		if ($v !== null && !is_int($v)) {
			$ts = strtotime($v);
			if ($ts === -1 || $ts === false) { 				throw new PropelException("Unable to parse date/time value for [updated_at] from input: " . var_export($v, true));
			}
		} else {
			$ts = $v;
		}
		if ($this->updated_at !== $ts) {
			$this->updated_at = $ts;
			$this->modifiedColumns[] = TransactionDataPeer::UPDATED_AT;
		}

	} 
	
	public function setCreatedAt($v)
	{

		if ($v !== null && !is_int($v)) {
			$ts = strtotime($v);
			if ($ts === -1 || $ts === false) { 				throw new PropelException("Unable to parse date/time value for [created_at] from input: " . var_export($v, true));
			}
		} else {
			$ts = $v;
		}
		if ($this->created_at !== $ts) {
			$this->created_at = $ts;
			$this->modifiedColumns[] = TransactionDataPeer::CREATED_AT;
		}

	} 
	
	public function setApprovedAt($v)
	{

		if ($v !== null && !is_int($v)) {
			$ts = strtotime($v);
			if ($ts === -1 || $ts === false) { 				throw new PropelException("Unable to parse date/time value for [approved_at] from input: " . var_export($v, true));
			}
		} else {
			$ts = $v;
		}
		if ($this->approved_at !== $ts) {
			$this->approved_at = $ts;
			$this->modifiedColumns[] = TransactionDataPeer::APPROVED_AT;
		}

	} 
	
	public function hydrate(ResultSet $rs, $startcol = 1)
	{
		try {

			$this->id = $rs->getInt($startcol + 0);

			$this->status_id = $rs->getInt($startcol + 1);

			$this->state_id = $rs->getInt($startcol + 2);

			$this->user_id = $rs->getInt($startcol + 3);

			$this->customer_id = $rs->getInt($startcol + 4);

			$this->ip = $rs->getString($startcol + 5);

			$this->receipt_id = $rs->getInt($startcol + 6);

			$this->order_id = $rs->getString($startcol + 7);

			$this->requested_amount_ct = $rs->getInt($startcol + 8);

			$this->requested_currency_code = $rs->getString($startcol + 9);

			$this->paid_amount_ct = $rs->getString($startcol + 10);

			$this->paid_currency_code = $rs->getString($startcol + 11);

			$this->sign_password = $rs->getString($startcol + 12);

			$this->transaction_id = $rs->getString($startcol + 13);

			$this->project_id = $rs->getString($startcol + 14);

			$this->project = $rs->getString($startcol + 15);

			$this->paytext = $rs->getString($startcol + 16);

			$this->returned_ss2 = $rs->getString($startcol + 17);

			$this->returned_error = $rs->getString($startcol + 18);

			$this->returned_status = $rs->getString($startcol + 19);

			$this->is_test = $rs->getString($startcol + 20);

			$this->data_json = $rs->getString($startcol + 21);

			$this->updated_at = $rs->getTimestamp($startcol + 22, null);

			$this->created_at = $rs->getTimestamp($startcol + 23, null);

			$this->approved_at = $rs->getTimestamp($startcol + 24, null);

			$this->resetModified();

			$this->setNew(false);

						return $startcol + 25; 
		} catch (Exception $e) {
			throw new PropelException("Error populating TransactionData object", $e);
		}
	}

	
	public function delete($con = null)
	{
		if ($this->isDeleted()) {
			throw new PropelException("This object has already been deleted.");
		}

		if ($con === null) {
			$con = Propel::getConnection(TransactionDataPeer::DATABASE_NAME);
		}

		try {
			$con->begin();
			TransactionDataPeer::doDelete($this, $con);
			$this->setDeleted(true);
			$con->commit();
		} catch (PropelException $e) {
			$con->rollback();
			throw $e;
		}
	}

	
	public function save($con = null)
	{
    if ($this->isModified() && !$this->isColumnModified(TransactionDataPeer::UPDATED_AT))
    {
      $this->setUpdatedAt(time());
    }

    if ($this->isNew() && !$this->isColumnModified(TransactionDataPeer::CREATED_AT))
    {
      $this->setCreatedAt(time());
    }

		if ($this->isDeleted()) {
			throw new PropelException("You cannot save an object that has been deleted.");
		}

		if ($con === null) {
			$con = Propel::getConnection(TransactionDataPeer::DATABASE_NAME);
		}

		try {
			$con->begin();
			$affectedRows = $this->doSave($con);
			$con->commit();
			return $affectedRows;
		} catch (PropelException $e) {
			$con->rollback();
			throw $e;
		}
	}

	
	protected function doSave($con)
	{
		$affectedRows = 0; 		if (!$this->alreadyInSave) {
			$this->alreadyInSave = true;


						if ($this->isModified()) {
				if ($this->isNew()) {
					$pk = TransactionDataPeer::doInsert($this, $con);
					$affectedRows += 1; 										 										 
					$this->setId($pk);  
					$this->setNew(false);
				} else {
					$affectedRows += TransactionDataPeer::doUpdate($this, $con);
				}
				$this->resetModified(); 			}

			$this->alreadyInSave = false;
		}
		return $affectedRows;
	} 
	
	protected $validationFailures = array();

	
	public function getValidationFailures()
	{
		return $this->validationFailures;
	}

	
	public function validate($columns = null)
	{
		$res = $this->doValidate($columns);
		if ($res === true) {
			$this->validationFailures = array();
			return true;
		} else {
			$this->validationFailures = $res;
			return false;
		}
	}

	
	protected function doValidate($columns = null)
	{
		if (!$this->alreadyInValidation) {
			$this->alreadyInValidation = true;
			$retval = null;

			$failureMap = array();


			if (($retval = TransactionDataPeer::doValidate($this, $columns)) !== true) {
				$failureMap = array_merge($failureMap, $retval);
			}



			$this->alreadyInValidation = false;
		}

		return (!empty($failureMap) ? $failureMap : true);
	}

	
	public function getByName($name, $type = BasePeer::TYPE_PHPNAME)
	{
		$pos = TransactionDataPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
		return $this->getByPosition($pos);
	}

	
	public function getByPosition($pos)
	{
		switch($pos) {
			case 0:
				return $this->getId();
				break;
			case 1:
				return $this->getStatusId();
				break;
			case 2:
				return $this->getStateId();
				break;
			case 3:
				return $this->getUserId();
				break;
			case 4:
				return $this->getCustomerId();
				break;
			case 5:
				return $this->getIp();
				break;
			case 6:
				return $this->getReceiptId();
				break;
			case 7:
				return $this->getOrderId();
				break;
			case 8:
				return $this->getRequestedAmountCt();
				break;
			case 9:
				return $this->getRequestedCurrencyCode();
				break;
			case 10:
				return $this->getPaidAmountCt();
				break;
			case 11:
				return $this->getPaidCurrencyCode();
				break;
			case 12:
				return $this->getSignPassword();
				break;
			case 13:
				return $this->getTransactionId();
				break;
			case 14:
				return $this->getProjectId();
				break;
			case 15:
				return $this->getProject();
				break;
			case 16:
				return $this->getPaytext();
				break;
			case 17:
				return $this->getReturnedSs2();
				break;
			case 18:
				return $this->getReturnedError();
				break;
			case 19:
				return $this->getReturnedStatus();
				break;
			case 20:
				return $this->getIsTest();
				break;
			case 21:
				return $this->getDataJson();
				break;
			case 22:
				return $this->getUpdatedAt();
				break;
			case 23:
				return $this->getCreatedAt();
				break;
			case 24:
				return $this->getApprovedAt();
				break;
			default:
				return null;
				break;
		} 	}

	
	public function toArray($keyType = BasePeer::TYPE_PHPNAME)
	{
		$keys = TransactionDataPeer::getFieldNames($keyType);
		$result = array(
			$keys[0] => $this->getId(),
			$keys[1] => $this->getStatusId(),
			$keys[2] => $this->getStateId(),
			$keys[3] => $this->getUserId(),
			$keys[4] => $this->getCustomerId(),
			$keys[5] => $this->getIp(),
			$keys[6] => $this->getReceiptId(),
			$keys[7] => $this->getOrderId(),
			$keys[8] => $this->getRequestedAmountCt(),
			$keys[9] => $this->getRequestedCurrencyCode(),
			$keys[10] => $this->getPaidAmountCt(),
			$keys[11] => $this->getPaidCurrencyCode(),
			$keys[12] => $this->getSignPassword(),
			$keys[13] => $this->getTransactionId(),
			$keys[14] => $this->getProjectId(),
			$keys[15] => $this->getProject(),
			$keys[16] => $this->getPaytext(),
			$keys[17] => $this->getReturnedSs2(),
			$keys[18] => $this->getReturnedError(),
			$keys[19] => $this->getReturnedStatus(),
			$keys[20] => $this->getIsTest(),
			$keys[21] => $this->getDataJson(),
			$keys[22] => $this->getUpdatedAt(),
			$keys[23] => $this->getCreatedAt(),
			$keys[24] => $this->getApprovedAt(),
		);
		return $result;
	}

	
	public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME)
	{
		$pos = TransactionDataPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
		return $this->setByPosition($pos, $value);
	}

	
	public function setByPosition($pos, $value)
	{
		switch($pos) {
			case 0:
				$this->setId($value);
				break;
			case 1:
				$this->setStatusId($value);
				break;
			case 2:
				$this->setStateId($value);
				break;
			case 3:
				$this->setUserId($value);
				break;
			case 4:
				$this->setCustomerId($value);
				break;
			case 5:
				$this->setIp($value);
				break;
			case 6:
				$this->setReceiptId($value);
				break;
			case 7:
				$this->setOrderId($value);
				break;
			case 8:
				$this->setRequestedAmountCt($value);
				break;
			case 9:
				$this->setRequestedCurrencyCode($value);
				break;
			case 10:
				$this->setPaidAmountCt($value);
				break;
			case 11:
				$this->setPaidCurrencyCode($value);
				break;
			case 12:
				$this->setSignPassword($value);
				break;
			case 13:
				$this->setTransactionId($value);
				break;
			case 14:
				$this->setProjectId($value);
				break;
			case 15:
				$this->setProject($value);
				break;
			case 16:
				$this->setPaytext($value);
				break;
			case 17:
				$this->setReturnedSs2($value);
				break;
			case 18:
				$this->setReturnedError($value);
				break;
			case 19:
				$this->setReturnedStatus($value);
				break;
			case 20:
				$this->setIsTest($value);
				break;
			case 21:
				$this->setDataJson($value);
				break;
			case 22:
				$this->setUpdatedAt($value);
				break;
			case 23:
				$this->setCreatedAt($value);
				break;
			case 24:
				$this->setApprovedAt($value);
				break;
		} 	}

	
	public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
	{
		$keys = TransactionDataPeer::getFieldNames($keyType);

		if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]);
		if (array_key_exists($keys[1], $arr)) $this->setStatusId($arr[$keys[1]]);
		if (array_key_exists($keys[2], $arr)) $this->setStateId($arr[$keys[2]]);
		if (array_key_exists($keys[3], $arr)) $this->setUserId($arr[$keys[3]]);
		if (array_key_exists($keys[4], $arr)) $this->setCustomerId($arr[$keys[4]]);
		if (array_key_exists($keys[5], $arr)) $this->setIp($arr[$keys[5]]);
		if (array_key_exists($keys[6], $arr)) $this->setReceiptId($arr[$keys[6]]);
		if (array_key_exists($keys[7], $arr)) $this->setOrderId($arr[$keys[7]]);
		if (array_key_exists($keys[8], $arr)) $this->setRequestedAmountCt($arr[$keys[8]]);
		if (array_key_exists($keys[9], $arr)) $this->setRequestedCurrencyCode($arr[$keys[9]]);
		if (array_key_exists($keys[10], $arr)) $this->setPaidAmountCt($arr[$keys[10]]);
		if (array_key_exists($keys[11], $arr)) $this->setPaidCurrencyCode($arr[$keys[11]]);
		if (array_key_exists($keys[12], $arr)) $this->setSignPassword($arr[$keys[12]]);
		if (array_key_exists($keys[13], $arr)) $this->setTransactionId($arr[$keys[13]]);
		if (array_key_exists($keys[14], $arr)) $this->setProjectId($arr[$keys[14]]);
		if (array_key_exists($keys[15], $arr)) $this->setProject($arr[$keys[15]]);
		if (array_key_exists($keys[16], $arr)) $this->setPaytext($arr[$keys[16]]);
		if (array_key_exists($keys[17], $arr)) $this->setReturnedSs2($arr[$keys[17]]);
		if (array_key_exists($keys[18], $arr)) $this->setReturnedError($arr[$keys[18]]);
		if (array_key_exists($keys[19], $arr)) $this->setReturnedStatus($arr[$keys[19]]);
		if (array_key_exists($keys[20], $arr)) $this->setIsTest($arr[$keys[20]]);
		if (array_key_exists($keys[21], $arr)) $this->setDataJson($arr[$keys[21]]);
		if (array_key_exists($keys[22], $arr)) $this->setUpdatedAt($arr[$keys[22]]);
		if (array_key_exists($keys[23], $arr)) $this->setCreatedAt($arr[$keys[23]]);
		if (array_key_exists($keys[24], $arr)) $this->setApprovedAt($arr[$keys[24]]);
	}

	
	public function buildCriteria()
	{
		$criteria = new Criteria(TransactionDataPeer::DATABASE_NAME);

		if ($this->isColumnModified(TransactionDataPeer::ID)) $criteria->add(TransactionDataPeer::ID, $this->id);
		if ($this->isColumnModified(TransactionDataPeer::STATUS_ID)) $criteria->add(TransactionDataPeer::STATUS_ID, $this->status_id);
		if ($this->isColumnModified(TransactionDataPeer::STATE_ID)) $criteria->add(TransactionDataPeer::STATE_ID, $this->state_id);
		if ($this->isColumnModified(TransactionDataPeer::USER_ID)) $criteria->add(TransactionDataPeer::USER_ID, $this->user_id);
		if ($this->isColumnModified(TransactionDataPeer::CUSTOMER_ID)) $criteria->add(TransactionDataPeer::CUSTOMER_ID, $this->customer_id);
		if ($this->isColumnModified(TransactionDataPeer::IP)) $criteria->add(TransactionDataPeer::IP, $this->ip);
		if ($this->isColumnModified(TransactionDataPeer::RECEIPT_ID)) $criteria->add(TransactionDataPeer::RECEIPT_ID, $this->receipt_id);
		if ($this->isColumnModified(TransactionDataPeer::ORDER_ID)) $criteria->add(TransactionDataPeer::ORDER_ID, $this->order_id);
		if ($this->isColumnModified(TransactionDataPeer::REQUESTED_AMOUNT_CT)) $criteria->add(TransactionDataPeer::REQUESTED_AMOUNT_CT, $this->requested_amount_ct);
		if ($this->isColumnModified(TransactionDataPeer::REQUESTED_CURRENCY_CODE)) $criteria->add(TransactionDataPeer::REQUESTED_CURRENCY_CODE, $this->requested_currency_code);
		if ($this->isColumnModified(TransactionDataPeer::PAID_AMOUNT_CT)) $criteria->add(TransactionDataPeer::PAID_AMOUNT_CT, $this->paid_amount_ct);
		if ($this->isColumnModified(TransactionDataPeer::PAID_CURRENCY_CODE)) $criteria->add(TransactionDataPeer::PAID_CURRENCY_CODE, $this->paid_currency_code);
		if ($this->isColumnModified(TransactionDataPeer::SIGN_PASSWORD)) $criteria->add(TransactionDataPeer::SIGN_PASSWORD, $this->sign_password);
		if ($this->isColumnModified(TransactionDataPeer::TRANSACTION_ID)) $criteria->add(TransactionDataPeer::TRANSACTION_ID, $this->transaction_id);
		if ($this->isColumnModified(TransactionDataPeer::PROJECT_ID)) $criteria->add(TransactionDataPeer::PROJECT_ID, $this->project_id);
		if ($this->isColumnModified(TransactionDataPeer::PROJECT)) $criteria->add(TransactionDataPeer::PROJECT, $this->project);
		if ($this->isColumnModified(TransactionDataPeer::PAYTEXT)) $criteria->add(TransactionDataPeer::PAYTEXT, $this->paytext);
		if ($this->isColumnModified(TransactionDataPeer::RETURNED_SS2)) $criteria->add(TransactionDataPeer::RETURNED_SS2, $this->returned_ss2);
		if ($this->isColumnModified(TransactionDataPeer::RETURNED_ERROR)) $criteria->add(TransactionDataPeer::RETURNED_ERROR, $this->returned_error);
		if ($this->isColumnModified(TransactionDataPeer::RETURNED_STATUS)) $criteria->add(TransactionDataPeer::RETURNED_STATUS, $this->returned_status);
		if ($this->isColumnModified(TransactionDataPeer::IS_TEST)) $criteria->add(TransactionDataPeer::IS_TEST, $this->is_test);
		if ($this->isColumnModified(TransactionDataPeer::DATA_JSON)) $criteria->add(TransactionDataPeer::DATA_JSON, $this->data_json);
		if ($this->isColumnModified(TransactionDataPeer::UPDATED_AT)) $criteria->add(TransactionDataPeer::UPDATED_AT, $this->updated_at);
		if ($this->isColumnModified(TransactionDataPeer::CREATED_AT)) $criteria->add(TransactionDataPeer::CREATED_AT, $this->created_at);
		if ($this->isColumnModified(TransactionDataPeer::APPROVED_AT)) $criteria->add(TransactionDataPeer::APPROVED_AT, $this->approved_at);

		return $criteria;
	}

	
	public function buildPkeyCriteria()
	{
		$criteria = new Criteria(TransactionDataPeer::DATABASE_NAME);

		$criteria->add(TransactionDataPeer::ID, $this->id);

		return $criteria;
	}

	
	public function getPrimaryKey()
	{
		return $this->getId();
	}

	
	public function setPrimaryKey($key)
	{
		$this->setId($key);
	}

	
	public function copyInto($copyObj, $deepCopy = false)
	{

		$copyObj->setStatusId($this->status_id);

		$copyObj->setStateId($this->state_id);

		$copyObj->setUserId($this->user_id);

		$copyObj->setCustomerId($this->customer_id);

		$copyObj->setIp($this->ip);

		$copyObj->setReceiptId($this->receipt_id);

		$copyObj->setOrderId($this->order_id);

		$copyObj->setRequestedAmountCt($this->requested_amount_ct);

		$copyObj->setRequestedCurrencyCode($this->requested_currency_code);

		$copyObj->setPaidAmountCt($this->paid_amount_ct);

		$copyObj->setPaidCurrencyCode($this->paid_currency_code);

		$copyObj->setSignPassword($this->sign_password);

		$copyObj->setTransactionId($this->transaction_id);

		$copyObj->setProjectId($this->project_id);

		$copyObj->setProject($this->project);

		$copyObj->setPaytext($this->paytext);

		$copyObj->setReturnedSs2($this->returned_ss2);

		$copyObj->setReturnedError($this->returned_error);

		$copyObj->setReturnedStatus($this->returned_status);

		$copyObj->setIsTest($this->is_test);

		$copyObj->setDataJson($this->data_json);

		$copyObj->setUpdatedAt($this->updated_at);

		$copyObj->setCreatedAt($this->created_at);

		$copyObj->setApprovedAt($this->approved_at);


		$copyObj->setNew(true);

		$copyObj->setId(NULL); 
	}

	
	public function copy($deepCopy = false)
	{
				$clazz = get_class($this);
		$copyObj = new $clazz();
		$this->copyInto($copyObj, $deepCopy);
		return $copyObj;
	}

	
	public function getPeer()
	{
		if (self::$peer === null) {
			self::$peer = new TransactionDataPeer();
		}
		return self::$peer;
	}

} 